package com.lagou.demo.controller;

import com.lagou.demo.service.IDemoService;
import com.lagou.edu.mvcframework.annotions.LagouAutowired;
import com.lagou.edu.mvcframework.annotions.LagouController;
import com.lagou.edu.mvcframework.annotions.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotions.LagouSecurity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author oyz
 */
@LagouController
@LagouRequestMapping("/demo")
public class DemoController {

    @LagouAutowired
    private IDemoService demoService;

    @LagouSecurity({"admin"})
    @LagouRequestMapping("/query")
    public String query(HttpServletRequest request, HttpServletResponse response,String name){
        return demoService.get(name);
    }

}
